package com.wl.designpattern.interpreter;

/**
 * 终结符表达式
 * Created by wangliang on 2021/2/27.
 */
public class VarExpression extends ArithmeticExpression {//变量表达式，用来解释变量
    private String var;

    public VarExpression(String var) {
        this.var = var;
    }

    @Override
    public String interpret(Context context) {//解释变量
        return var;
    }
}
